<div class="form-reg">
<div class="form-reg-atas"></div>
<div class="form-reg-tengah">
<?php 
if(isset($_SESSION['sys_admin']) and isset($_SESSION['name'])){
?>
<?php
	
	echo "<h2>".$h2_title."</h2>";
	echo ! empty($message) ? '<p class="message">' . $message . '</p>': '';

	$flashmessage = $this->session->flashdata('message');
	echo ! empty($flashmessage) ? '<p class="message">' . $flashmessage . '</p>': '';
?>
<form action="<?php echo $form_action;?>" method="post">
<div align="center">
<table>
	<input type="hidden" name="id" value="<?php foreach($user_id->result() as $id):
			echo $id->user_id + 1;endforeach;
		?>"/>
    
    <tr>
    	<td>User Name<font class="notif">*</font><td><td>:</td><td><input type="text" name="name" value="<?php echo ! empty($username)? ''.$username.'':'';?>" /></td><td></td><td><?php echo form_error('name', '<i class="field_error">', '</i>');?></td>
    </tr>
	<tr>
    	<td>Full Name<td><td>:</td><td><input type="text" name="fname" value="<?php echo ! empty($fname)? ''.$fname.'':'';?>" /></td><td></td><td><?php echo form_error('fname', '<i class="field_error">', '</i>');?></td>
    </tr>
    
    <tr>
    	<td>Email<font class="notif">*</font><td><td>:</td><td><input type="text" name="email" value="<?php echo ! empty($email)? ''.$email.'':'';?>" /></td><td></td><td><?php echo form_error('email', '<i class="field_error">', '</i>');?></td>
    </tr>
    
    <tr>
    	<td>Password<font class="notif">*</font><td><td>:</td><td><input type="password" name="pass" value="<?php echo ! empty($pass1)? ''.$pass1.'':'';?>" /></td><td></td><td><?php echo form_error('pass', '<i class="field_error">', '</i>');?></td>
    </tr>
    
    <tr>
    	<td>Confirm Password<font class="notif">*</font><td><td>:</td><td><input type="password" name="pass2" value="<?php echo ! empty($pass2)? ''.$pass2.'':'';?>" /></td><td></td><td><?php echo form_error('pass2', '<i class="field_error">', '</i>');?></td>
    </tr>
    <tr>
    	<td>Dept Name<font class="notif">*</font><td><td>:</td><td>
        <select name="dept_id">
        	<?php foreach($dept->result() as $dept): ?>
            	<option value="<?php echo $dept->dept_id;?>"><?php echo $dept->dept_name;?></option>
            <?php endforeach; ?>
        </select>
        </td><td></td>
    </tr>
    <tr>
    	<td>Mandiri ID<font class="notif">*</font><td><td>:</td><td><input type="text" name="mandiri_id" value="<?php echo ! empty($mandiriID)? ''.$mandiriID.'':'';?>" /></td><td> </td><td><?php echo form_error('mandiri_id', '<i class="field_error">', '</i>');?></td>
    </tr>
	<tr>
    	<td>User Right<td><td></td><td> <select name="user_right">
			<option value="1">IT Security</option>
			<option value="2">Manager</option>
			<option value="3">Internal Auditor</option>
			<option value="4">Department Pic</option>
			<option value="5">Security Consultant</option>        	
        </select></td>
    </tr>
   
    <tr>
    	<td><td><td></td><td><input type="hidden" value="0" name="status"></td>
    </tr>
   
	
</table>
</div>
<div class="notif">*)  can not be empty</div>
<div class="form-reg-submit"><input type="submit" class="ok" value="" />&nbsp;&nbsp;<input type="reset" value="" class="no" /></div>
</form>
<?php } ?>
</div>
<div class="form-reg-bawah"></div>
</div>